/**
 * 
 */
package com.contact.action;

import com.opensymphony.xwork2.ActionSupport;

/**
 * @author david
 *
 */
public class VerifyAction extends ActionSupport {
	
	private String email;
	
	private String netCode;
	
	private String imei;
	
	private boolean valid;

	
	/* (non-Javadoc)
	 * @see com.opensymphony.xwork2.ActionSupport#execute()
	 */
	@Override
	public String execute() throws Exception {
		//read the code from db
		String code = "";
		
		if (code.equalsIgnoreCase(netCode)) {
			valid = true;
			return ActionSupport.SUCCESS;
		} else {
			valid = true;
			return ActionSupport.SUCCESS;
		}
	}
	
	public String generateNetCode() throws Exception {
		//generate 4 digits code
		//send the code to email, store the code to db
		return ActionSupport.SUCCESS;
	}


	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}


	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}


	/**
	 * @return the netCode
	 */
	public String getNetCode() {
		return netCode;
	}


	/**
	 * @param netCode the netCode to set
	 */
	public void setNetCode(String netCode) {
		this.netCode = netCode;
	}


	/**
	 * @return the imei
	 */
	public String getImei() {
		return imei;
	}


	/**
	 * @param imei the imei to set
	 */
	public void setImei(String imei) {
		this.imei = imei;
	}

	/**
	 * @return the valid
	 */
	public boolean isValid() {
		return valid;
	}

	/**
	 * @param valid the valid to set
	 */
	public void setValid(boolean valid) {
		this.valid = valid;
	}
	
	
	
}
